<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="/timefunction" prefix="tmf"%>
<jsp:include page="header.jsp"></jsp:include>
				<div id="content">
						<!-- 没有日志 -->
					<c:if test="${fn:length(catg.includeArticles)<1}">
						<h2 class="center">
							没有该分类的日志
						</h2>
					</c:if>
					<!-- 有日志 -->
				<c:forEach items="${catg.includeArticles}" var="article" begin="${startIndex}" end="${endIndex}">
					<div class="post" id="post-${article.id }">
						
						<div class="postHeading">
							<div class="postDate">
							${tmf:getFormateTimeStr(
							'<p> %Mc </p>
							<p class=day>%D</p>
							<p> %Y</p>' 
							,article.postTime) }
							</div><!-- post date ends -->
							<div class="postTitle">
								<h2><a href="${pageContext.request.contextPath}/blog/${article.id}"  title="${article.title
											}">${article.title
											}</a></h2>
								<small>作者: admin</small>
							</div><!-- post title ends -->
						</div><!-- post heading ends -->	
						<div class="entry">
					<c:set var="contLen" value="${fn:length(article.content)}"></c:set>
								<c:if test="${contLen>500}">
										${fn:substring(article.content,0,500)}
										</p>

									<span> &nbsp;&nbsp;...</span>


								</c:if>
								<c:if test="${contLen<=500}">
										${article.content}
									</c:if>
					
		
						<p class="postmetadata"> Posted in <a href="${pageContext.request.contextPath}/category/${article.category.id}" title="查看 未分类 的全部文章"
									rel="category">${article.category.name }</a> 
						 | <c:if test="${adminIsLogin!=null}">
									&#183;
								<a class="post-edit-link"
								href="${pageContext.request.contextPath}/admin/blogs/${article.id }/edit" title="编辑文章">编辑 </a>
								</c:if> 
								<a href="${pageContext.request.contextPath}/blog/${article.id }#comments"
									class="comments-link">${fn:length(article.comments)} Comments</a>
						  </p>	
						</div>
					</div><!-- post ends -->
		</c:forEach>
				<!-- 分页导航 -->	
				<div class="navigation">
					<div class="alignleft"></div>
					<div class="alignright"></div>
				</div>
			
				<jsp:include page="footer.jsp"></jsp:include>